<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    {% if title %}
    <title>{{title}} - 每日金句</title>
    {% else %}
    <title>每日金句</title>
    {% endif %}
</head>
<body>
    <div>每日金句: <a href="/">主页</a>
    {% if not (username == 'Guest') %}
     | <a href="{{ url_for('user', nickname = username) }}">个人信息</a>
     | <a href="{{ url_for('logout') }}">注销</a>
     {% endif %}
    </div>
    <h1>Hi, {{username}}!<img src="{{ user['figureurl_qq_1']}}"></h1>
    {% if username == 'Guest'%}
    <div>
        <span>登录进入管理：</span>
        <a href="{{url_for('qq_login')}}">
            <img src="{{ url_for('static',filename='Connect_logo_3.png')}}">
        </a>
    </div>
    {% else %}
    <div>
        <a href="{{url_for('logout')}}">退出登录 </a>
    </div>
    {% endif %}
    <hr>
    {% with messages = get_flashed_messages() %}
    {% if messages %}
    <ul>
    {% for message in messages %}
        <li>{{ message }} </li>
    {% endfor %}
    </ul>
    {% endif %}
    {% endwith %}
    {% block content %}{% endblock %}
</body>
</html>
